/*
 * @Author: Li Zengkun
 * @Date: 2022-09-12 19:34:03
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-13 19:44:34
 * @Description: category api
 */
import axios from "axios"

// 删除指定id分类
const remove = (data) => axios.post('/category/remove', data)

// 添加分类
const add = (data) => axios.post('/category/add', data)

// 编辑指定id分类
const edit = (data) => axios.post('/category/edit', data)

// 获得子集分类
const sub = (params) => axios.get('/category/sub', { params })

// 获取所有分类
const list = (params) => axios.get('/category/list', { params })

// 获取指定id的分类详情
const detail = (params) => axios.get('/category/detail', { params })

export default {
    remove,
    add,
    edit,
    sub,
    list,
    detail
}